package com.ponhu.ea2.goodsCenter.provider.service;

import com.ponhu.ea2.dto.PhPropertyValueDto;
import com.ponhu.ea2.entity.Material;
import com.ponhu.ea2.entity.PhMaterialPropertyValueMd;
import com.baomidou.mybatisplus.extension.service.IService;
import com.ponhu.ea2.vo.PhPropertyEditVo;
import com.ponhu.ea2.vo.PhPropertyVo;

import java.util.List;

/**
 * <p>
 * 物料与属性值关系表 服务类
 * </p>
 *
 * @author ${author}
 * @since 2021-10-19
 */
public interface PhMaterialPropertyValueMdService extends IService<PhMaterialPropertyValueMd> {

    /**
     * 根据物料ID查询所有属性及属性值关系
     *
     * @param materialId
     * @return
     */
    List<PhMaterialPropertyValueMd> getPropertyValuesByMaterialId(Long materialId);

    /**
     * 根据物料D查询所有属性Map
     *
     * @param materialId
     * @return
     */
    List<PhPropertyVo> getPropertyValueMap(Long materialId);

    /**
     * 保存物料属性信息
     * @param propertyList
     */
    void savePhmaterialProperty(List<PhPropertyValueDto> propertyList, Material material);

    List<PhPropertyEditVo> getPropertyValueVos(String materialId, Long thirdCategoryId);

    /**
     * 更新物料属性信息
     * @param propertyList
     * @param materialId
     */
    void updatePhmaterialProperty(List<PhPropertyValueDto> propertyList, Long materialId);

    /**
     * 删除物料属性信息
     * @param materialId
     * @return
     */
    public boolean removeMaterialProperty(Long materialId);
}
